<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        body{
            width:3000px ;
            height: 3000px;
            
        }

    </style>

</head>

<body>
    <!-- <button id="on">开启</button>

    <button id="off">关闭</button> -->

    <script>
        // on: onclick = function () {
        //     window.open('https://www.baidu.com/')
        // }
        // off: onclick = function () {
        //     window.close()
        // }


        /**
         * 资源加载完毕执行
         * 
         * 
        */
        window.onload = function () {

        }
        //    可视尺寸
        window.onresize = function () {

        }
        // 滚动条改变
        window.onscroll = function () {
            var height = document.documentElement.scrollTop||document.body.scrollTop

                console.log(height);
        }

        // 浏览器卷去尺寸



    </script>
</body>

</html>